<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <!-- 避免IE使用兼容模式 -->
    <meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1">
    <meta name="renderer" content="webkit">
    <!-- TopJUI框架样式 -->
    <link type="text/css" href="../../topjui/css/topjui.core.min.css" rel="stylesheet">
    <link type="text/css" href="../../topjui/themes/default/topjui.green.css" rel="stylesheet" id="dynamicTheme"/>
    <!-- FontAwesome字体图标 -->
    <link type="text/css" href="../../topjui/plugins/font-awesome/css/font-awesome.min.css" rel="stylesheet"/>
    <!-- jQuery相关引用 -->
    <script type="text/javascript" src="../../topjui/plugins/jquery/jquery.min.js"></script>
    <script type="text/javascript" src="../../topjui/plugins/jquery/jquery.cookie.js"></script>
    <!-- TopJUI框架配置 -->
    <script type="text/javascript" src="../../static/public/js/topjui.config.js"></script>
    <!-- TopJUI框架核心-->
    <script type="text/javascript" src="../../topjui/js/topjui.core.min.js"></script>
    <!-- TopJUI中文支持 -->
    <script type="text/javascript" src="../../topjui/js/locale/topjui.lang.zh_CN.js"></script>
</head>

<body>
<form data-toggle="topjui-form">
    <table class="editTable">
        <tr>
            <td colspan="4">
                <div class="divider">
                    <span>调用本地数据</span>
                </div>
            </td>
        </tr>
        <tr>
            <td class="label">性别</td>
            <td>
                <input type="text" name="sex"
                       data-toggle="topjui-combobox"
                       data-options="data:[{value:1,text:'男'},{value:2,text:'女'}]">
            </td>
            <td class="label">学历（必填）</td>
            <td>
                <input type="text" name="degree"
                       data-toggle="topjui-combobox"
                       data-options="required:true,
                       valueField:'id',
                       textField:'text',
                       data:[{id:1,text:'大专'},{id:2,text:'本科'},{id:3,text:'研究生'},{id:4,text:'博士生'}]">
            </td>
        </tr>
        <tr>
            <td colspan="4">
                <div class="divider">
                    <span>调用远程数据</span>
                </div>
            </td>
        </tr>
        <tr>
            <td class="label">籍贯</td>
            <td>
                <input type="text" name="nativePlace"
                       data-toggle="topjui-combobox"
                       data-options="panelHeight:250,
                       valueField:'id',
                       url:_ctx + '/json/combobox/nativePlace.json'">
            </td>
            <td class="label">民族（必填）</td>
            <td>
                <input type="text" name="nation"
                       data-toggle="topjui-combobox"
                       data-options="required:true,
                       prompt:'必填',
                       panelHeight:250,
                       valueField:'id',
                       url:_ctx + '/json/combobox/nation.json'">
            </td>
        </tr>
        <tr>
            <td colspan="4">
                <div class="divider">
                    <span>多级联动下拉框（主动级联，上级触发下级）</span>
                </div>
            </td>
        </tr>
        <tr>
            <td class="label">国家</td>
            <td>
                <input type="text" name="country"
                       data-toggle="topjui-combobox"
                       data-options="panelHeight:250,
                       url:_ctx + '/json/combobox/country.json',
                       valueField: 'id',
                       childCombobox:{
                           id:'province',
                           url:remoteHost+'/system/codeItem/getListByPid?pid={parentValue}'
                       }">
            </td>
            <td class="label">省份</td>
            <td>
                <input type="text" name="province"
                       data-toggle="topjui-combobox"
                       data-options="id:'province',
                       panelHeight:250,
                       valueField: 'id',
                       childCombobox:{
                           id:'city',
                           url:remoteHost+'/system/codeItem/getListByPid?pid={parentValue}'
                       }">
            </td>
        </tr>
        <tr>
            <td class="label">城市</td>
            <td>
                <input type="text" name="city"
                       data-toggle="topjui-combobox"
                       data-options="id:'city',
                       panelHeight:250,
                       valueField: 'id',
                       childCombobox:{
                           id:'district',
                           url:remoteHost+'/system/codeItem/getListByPid?pid={parentValue}'
                       }">
            </td>
            <td class="label">区县</td>
            <td>
                <input type="text" name="district"
                       data-toggle="topjui-combobox"
                       data-options="id:'district',
                       panelHeight:250,
                       valueField: 'id'">
            </td>
        </tr>
        <tr>
            <td colspan="4">
                <div class="divider">
                    <span>多级联动下拉框（被动级联，下级获取上级）</span>
                </div>
            </td>
        </tr>
        <tr>
            <td class="label">国家</td>
            <td>
                <input type="text" name="country2"
                       data-toggle="topjui-combobox"
                       data-options="panelHeight:250,
                       url:_ctx + '/json/combobox/country.json',
                       valueField: 'id',
                       childCombobox:{
                           id:'province2'
                       }">
            </td>
            <td class="label">省份</td>
            <td>
                <input type="text" name="province2"
                       data-toggle="topjui-combobox"
                       data-options="id:'province2',
                       panelHeight:250,
                       valueField: 'id',
                       url:remoteHost+'/system/codeItem/getListByPid?pid={country2}',
                       childCombobox:{
                           id:'city2'
                       }">
            </td>
        </tr>
        <tr>
            <td class="label">城市</td>
            <td>
                <input type="text" name="city2"
                       data-toggle="topjui-combobox"
                       data-options="id:'city2',
                       panelHeight:250,
                       valueField: 'id',
                       url:remoteHost+'/system/codeItem/getListByPid?pid={province2}',
                       childCombobox:{
                           id:'district2'
                       }">
            </td>
            <td class="label">区县</td>
            <td>
                <input type="text" name="district2"
                       data-toggle="topjui-combobox"
                       data-options="id:'district2',
                       panelHeight:250,
                       valueField: 'id',
                       url:remoteHost+'/system/codeItem/getListByPid?pid={city2}'">
            </td>
        </tr>
    </table>
</form>
</body>
</html>